<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="main :: common_head">
<meta http-equiv=Content-Type content="text/html;charset=utf-8">
</head>
<style>
    .mylabel {
        display: inline;
    }
</style>
<body>

<div class="container-fluid-full">
    <div class="row-fluid">

        <noscript>
            <div class="alert alert-block span10">
                <h4 class="alert-heading">Warning!</h4>
                <p>You need to have <a href="" target="_blank">JavaScript</a> enabled to use this site.</p>
            </div>
        </noscript>

        <!-- start: Content -->
        <div id="content" class="span10" style="width: 100%;">
            <ul class="breadcrumb" th:if="${#request.getParameter('breadcrumb') == 'true'}">
                <li>
                    <i class="fas fa-circle-notch"></i>
                    <a id="home" href="#" onclick="parent.location.reload()">主页</a>
                    <i class="icon-angle-right"></i>
                </li>
                <li><a href="#">[[${device.deviceName}]]信息</a></li>
            </ul>
            <div class="row-fluid sortable">
                <div class="box span12">
                    <div class="box-header" data-original-title>
                        <h2><i class="halflings-icon white edit"></i><span class="break"></span>[[${device.deviceName}]]</h2>
                        <div class="box-icon"></div>
                    </div>
                    <div class="box-content">
                        <form class="form-horizontal">
                            <fieldset>
                                <div class="control-group">
                                    <label class="control-label">设备ID</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.deviceId}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">设备名</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.deviceName}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">能量编码</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.devName}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">电量编码</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.batteryName}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">内温编码</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.temperatureName}"></span>
                                    </div>
                                </div>
                                <div class="control-group" th:if="${device.deviceType.typeId==2}">
                                    <label class="control-label">放能完成标志</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.endFlagName}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">是否纳入决策</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:if="${device.isPredicted==0}">纳入决策</span>
                                        <span class="input-xlarge uneditable-input" th:if="${device.isPredicted==1}">不纳入决策</span>
                                        <span class="input-xlarge uneditable-input" th:if="${device.isPredicted==2}">只显示策略建议</span>
                                    </div>
                                </div>
                                <div class="control-group" th:if="${device.deviceType.typeId==2}">
                                    <label class="control-label">上限温度</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.upperTemp}"></span>
                                    </div>
                                </div>
                                <div class="control-group" th:if="${device.deviceType.typeId==2}">
                                    <label class="control-label">下限温度</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.lowerTemp}"></span>
                                    </div>
                                </div>
                                <div class="control-group" th:if="${device.deviceType.typeId==2}">
                                    <label class="control-label">设备冷热属性</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.coldorheat}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">平均每小时产能量</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.power}"></span>
                                        <span style="font-size: 20px">kWh</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">能效比</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.conversionRate}"></span>
                                    </div>
                                </div>
                                <!--<div class="control-group" th:if="${#arrays.isEmpty(relationship)&&device.deviceType.typeId!=3}">-->
                                <!--<label class="control-label">关联设备</label>-->
                                <!--<div class="controls">-->
                                <!--&lt;!&ndash;<span class="input-xlarge uneditable-input" ></span>&ndash;&gt;-->
                                <!--&lt;!&ndash;<label class="mylabel">能效比:</label>&ndash;&gt;-->
                                <!--<span class="input-xlarge uneditable-input"></span>-->
                                <!--<label class="mylabel" >损耗率:</label>-->
                                <!--<span class="input-xlarge uneditable-input"></span>-->
                                <!--&lt;!&ndash;<button type="button" onclick="addRelation()">+</button>&ndash;&gt;-->
                                <!--</div>-->
                                <!--</div>-->
                                <!--<div class="control-group" th:each="relation:${relationship}">-->
                                <!--<label class="control-label">关联设备</label>-->
                                <!--<div class="controls">-->
                                <!--<span class="input-xlarge uneditable-input" th:text="${relation.deviceName}"></span>-->
                                <!--&lt;!&ndash;<label class="mylabel">能效比:</label>&ndash;&gt;-->
                                <!--&lt;!&ndash;<input class="input-small focused" th:value="${relation.conversionRate}" type="text" placeholder=""&ndash;&gt;-->
                                <!--&lt;!&ndash;name="conversionRate">&ndash;&gt;-->
                                <!--&lt;!&ndash;<span class="input-xlarge uneditable-input" th:text="${relation.conversionRate}"></span>&ndash;&gt;-->
                                <!--<label class="mylabel" >损耗率:</label>-->
                                <!--&lt;!&ndash;<input class="input-small focused" type="text" placeholder=""&ndash;&gt;-->
                                <!--&lt;!&ndash;name="lossRate" th:value="${relation.lossRate}">&ndash;&gt;-->
                                <!--<span class="input-xlarge uneditable-input" th:text="${relation.lossRate}"></span>-->
                                <!--<label class="mylabel" >能源属性:</label>-->
                                <!--<span class="input-xlarge uneditable-input" th:text="${relation.typeName}"></span>-->
                                <!--</div>-->
                                <!--</div>-->
                                <div class="control-group">
                                    <label class="control-label">上限</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${device.cap}"></span>
                                        <span style="font-size: 20px">kWh</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">设备开启时间</label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${startTime+':00'}"></span>
                                        <span>至</span>
                                        <span class="input-xlarge uneditable-input" th:text="${endTime+':00'}"></span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">设备图片</label>
                                    <div class="controls">
                                        <div style="width: 80px;height: 80px;background-color: #578ebe;">
                                            <img style="width: 80px;height: 80px;" th:src="${device.picPath}" alt="">
                                        </div>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">高亮图片</label>
                                    <div class="controls">
                                        <div style="width: 80px;height: 80px;background-color: #578ebe;">
                                            <img style="width: 80px;height: 80px;" th:src="${device.highlightPicPath}" alt="">
                                        </div>
                                    </div>
                                </div>
                                <div class="control-group" th:each="property:${propertyList}">
                                    <label class="control-label" th:text="${property.propertyDes}"></label>
                                    <div class="controls">
                                        <span class="input-xlarge uneditable-input" th:text="${property.propertyValue}"></span>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <button type="button" class="btn btn-primary" onclick="toDevice()">返回</button>
                                </div>
                            </fieldset>
                        </form>
                    </div>
                </div><!--/span-->
            </div><!--/row-->
        </div>
    </div>
</div>

<div class="modal hide fade" id="myModal">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">×</button>
        <h3>Settings</h3>
    </div>
    <div class="modal-body">
        <p>Here settings can be configured...</p>
    </div>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>
    </div>
</div>
<div class="common-modal modal fade" id="common-Modal1" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-content">
        <ul class="list-inline item-details">
            <li><a href="http://sc.chinaz.com">Admin templates</a></li>
            <li><a href="http://sc.chinaz.com">Bootstrap themes</a></li>
        </ul>
    </div>
</div>

<div class="clearfix"></div>

<div th:replace="main::common_js"></div>

<script th:inline="javascript">
    breadcrumb()
    window.onload = function() {
        parent.modifyTitle([[${device.deviceName}]])
    }
</script>

<script th:src="@{/js/detect-element-resize.js}"></script>
<script th:src="@{/js/iframe-resize.js}"></script>

<script>
    //返回上一页
    function toDevice() {
        window.history.back(-1);
    }
</script>
</body>
</html>
